<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/**
<span class='line'>  2</span> * @lends Bio.Align
<span class='line'>  3</span> */</span><span class="WHIT">
<span class='line'>  4</span> </span><span class="NAME">Bio.Align</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Class.create</span><span class="PUNC">(</span><span class="NAME">Bio.Root</span><span class="PUNC">,</span><span class="PUNC">{</span><span class="WHIT"> 
<span class='line'>  5</span> </span><span class="COMM">/**
<span class='line'>  6</span>  * Bio.Align
<span class='line'>  7</span>  * @Author Lee Katz &lt;lskatz@gmail.com>
<span class='line'>  8</span>  * @class An interface for Alignment classes.
<span class='line'>  9</span>  * @constructs
<span class='line'> 10</span>  * @extends Bio.Root
<span class='line'> 11</span>  */</span><span class="WHIT">
<span class='line'> 12</span> </span><span class="WHIT">  </span><span class="NAME">initialize</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">$super</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 13</span> </span><span class="WHIT">    </span><span class="NAME">this.options</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Object.extend</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 14</span> </span><span class="WHIT">      </span><span class="NAME">file</span><span class="PUNC">:</span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// TODO accept a filename</span><span class="WHIT">
<span class='line'> 15</span> </span><span class="WHIT">      </span><span class="NAME">fileText</span><span class="PUNC">:</span><span class="KEYW">false</span><span class="WHIT"> </span><span class="COMM">// the string contents of a file</span><span class="WHIT">
<span class='line'> 16</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 17</span> </span><span class="WHIT">  </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 18</span> </span><span class="WHIT">  </span><span class="COMM">/**
<span class='line'> 19</span>    * Add a sequence to the MSA.  Does not align.
<span class='line'> 20</span>    * @returns Seq The freshly added Seq
<span class='line'> 21</span>    */</span><span class="WHIT">
<span class='line'> 22</span> </span><span class="WHIT">  </span><span class="NAME">addSeq</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 23</span> </span><span class="WHIT">    </span><span class="NAME">this.notImplemented</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 24</span> </span><span class="WHIT">  </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 25</span> </span><span class="WHIT">  </span><span class="COMM">/**
<span class='line'> 26</span>    * Remove a sequence from the MSA.
<span class='line'> 27</span>    * Does not realign the remaining Seqs
<span class='line'> 28</span>    * @returns Seq The removed Seq
<span class='line'> 29</span>    * @param Seq the object to remove
<span class='line'> 30</span>    */</span><span class="WHIT">
<span class='line'> 31</span> </span><span class="WHIT">  </span><span class="NAME">removeSeq</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 32</span> </span><span class="WHIT">    </span><span class="NAME">this.notImplemented</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 33</span> </span><span class="WHIT">  </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 34</span> </span><span class="WHIT">  </span><span class="COMM">/**
<span class='line'> 35</span>    * Returns an array of sequences, sorted by ID
<span class='line'> 36</span>    * @returns Array array of sequences
<span class='line'> 37</span>    * @TODO allow a sort parameter
<span class='line'> 38</span>    */</span><span class="WHIT">
<span class='line'> 39</span> </span><span class="WHIT">  </span><span class="NAME">each_seq</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 40</span> </span><span class="WHIT">    </span><span class="NAME">this.notImplemented</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 41</span> </span><span class="WHIT">  </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 42</span> </span><span class="WHIT">  </span><span class="COMM">/**
<span class='line'> 43</span>    * Perform a multiple sequence alignment.
<span class='line'> 44</span>    * @TODO give an option on which algorithm to align with, or an option to send the sequences to a server to perform MSA
<span class='line'> 45</span>    */</span><span class="WHIT">
<span class='line'> 46</span> </span><span class="WHIT">  </span><span class="NAME">align</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 47</span> </span><span class="WHIT">    </span><span class="NAME">this.notImplemented</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 48</span> </span><span class="WHIT">  </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 49</span> </span><span class="WHIT">  </span><span class="NAME">consensus_string</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 50</span> </span><span class="WHIT">    </span><span class="NAME">this.notImplemented</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 51</span> </span><span class="WHIT">  </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 52</span> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 53</span> </span></pre></body></html>